using System;
using System.Windows.Data;
using jSLCore.Client.Presentation.jBinding.BaseConverters;

namespace jSLCore.Client.Presentation.jBinding
{
    public class jBinding : Binding
    {
        public jBinding(string path) : base(path)
        {
        }

        public jBinding()
        {
        }

        public jConvertMode ConvertingMode
        {
            get
            {
                if (Converter is jCurrencyConverter) return jConvertMode.Currency;
                return jConvertMode.AsIs;
            }
            set { Converter = ConverterUtility.CreateConverterFromConvertingType(value); }
        }
    }
}